using System.Collections.Generic;
using BehaviorDesigner.Runtime.Tasks;
using QFramework;
using UnityEngine;

namespace HareGame
{
    [TaskCategory("引导")]
    public class GuideStart : Action
    {
        [Header("引导ID")]
        public GuideID GuideID = GuideID.新手引导;

        public override void OnStart()
        {
            base.OnStart();
            GameEntry.UI.OpenUI<UIGuideMask>(UILevel.CanvasPanel);

            Dictionary<string, object> _dicEvent = new Dictionary<string, object>();
            _dicEvent.Add("guideName", GuideID.ToString());
            GameEntry.SDK.SendEvent("guide_start", _dicEvent);
        }

        public override TaskStatus OnUpdate()
        {
            return TaskStatus.Success;
        }
    }
}